package com.itheima.date;

import java.time.Duration;
import java.time.LocalDateTime;

public class demojdk03 {
    public static void main(String[] args) {
        LocalDateTime localDateTime1= LocalDateTime.of(2020, 11, 12, 13, 14, 15);
        LocalDateTime localDateTime2 = LocalDateTime.of(2020, 11, 13, 14, 15, 16);
        Duration between = Duration.between(localDateTime1, localDateTime2);
        System.out.println(between);
        System.out.println(between.toDays());
        System.out.println(between.getSeconds());
        System.out.println(between.toMillis());
        System.out.println(between.toNanos());
    }
}
